<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">
<title>云盘首页</title>
<jsp:include page="/public/pub.jsp"></jsp:include>
</head>
<body>
	<jsp:include page="/public/top.jsp"></jsp:include>
	<div class="main-container" id="main-container">
		<script language="javascript">
			function ret() {
				window.location.href = "index.jsp";
			}
		</script>
		<script type="text/javascript">
			try {
				ace.settings.check('main-container', 'fixed')//主界面展开显示
			} catch (e) {
			}
		</script>
		<div class="main-container-inner">
			<a class="menu-toggler" id="menu-toggler" href="#"> <span class="menu-text"></span>
			</a>
			<jsp:include page="/public/left.jsp"></jsp:include>
			<div class="main-content">
				<div class="breadcrumbs" id="breadcrumbs">
					<script type="text/javascript">
						try {
							ace.settings.check('breadcrumbs', 'fixed')//展开breadcrumbs
						} catch (e) {
						}
					</script>
					<div>
						<ul class="breadcrumb">
							<li><i class="icon-home home-icon"></i> <a href="#">首页</a></li>
							<li class="active">我的搜索</li>
						</ul>
					</div>
					<c:choose>
						<c:when test="${searchfs==null}">&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:red">您还没有搜索过文件哦!</span>
							<ul class="breadcrumb">
								<input type="button" class="button darkblue" value="返回搜索" onclick="ret()" />
							</ul>
						</c:when>
						<c:otherwise>
							<ul class="breadcrumb">
								&nbsp;&nbsp;
								<input type="button" class="button darkblue" value="返回搜索" onclick="ret()" /> &nbsp;&nbsp;搜索:
								<span style="color:red">${searchName}</span>
							</ul>
						</c:otherwise>
					</c:choose>
					<!-- .breadcrumb -->
				</div>
				<div class="page-content">
					<!-- /.page-header -->
					<div class="row">
						<div class="col-xs-12">
							<!-- PAGE CONTENT BEGINS -->
							<table id="sample-table-1" class="table table-striped table-bordered table-hover">
								<thead>
									<tr>
										<th class="center">文件名</th>
										<th class="center">文件类型</th>
										<th class="center">文件大小</th>
										<th class="center">修改日期</th>
									</tr>
								</thead>
								<tbody id="listdir">
									<c:forEach items="${searchfs}" var="entry" varStatus="sta">
										<c:if test="${entry.type=='D'}">
											<tr class="center">
												<td><a href="cloud/list.do?name=${dirsearch}/${entry.name}">${entry.name}</a></td>
												<td>文件夹</td>
												<td>---</td>
												<td>${entry.date}</td>
											</tr>
										</c:if>
										<c:if test="${entry.type=='F'}">
											<tr class="center">
												<td>${entry.name}</td>
												<td>${entry.viewflag}</td>
												<td>${entry.size}</td>
												<td>${entry.date}</td>
											</tr>
										</c:if>
									</c:forEach>
								</tbody>
							</table>
							<!-- PAGE CONTENT ENDS -->
						</div>
						<!-- /.col -->
					</div>
					<!-- /.row -->
				</div>
				<!-- /.page-content -->
			</div>
			<!-- /.main-content -->
			<jsp:include page="/public/container.jsp"></jsp:include>
		</div>
	</div>
</body>
</html>
